core: version_gate v36 SSOT (BTC-first) - #148
Merged
Merged
Conversation
Introduce core::version_gate as the single source of truth for the V36 share-format / consensus-revision activation boundary (uniform 36 across all coins). Replace the seven scattered "version >= 36" literals in the BTC share serializer with core::version_gate::is_v36_active(version). Scope: owns the v36 share-format gate only. Segwit activation stays per coin PoolConfig (BTC 33, dgb 35, ltc/bch 17) — explicitly out of scope. BTC is the reference adoption; ltc/dgb/bch conform by mechanical site-rewrite (no value change, byte-identical gate). constexpr predicate serves both if-constexpr template gates and runtime checks. c2pool-btc builds green (self-verify).
Mechanical follow-up to b4d1912: replace the remaining bare >= 36 share-version gates with core::version_gate::is_v36_active(). 26 sites in share_check.hpp (both if constexpr and runtime) + 1 in share_tracker.hpp; byte-identical gate, no value change. Comments referencing p2pool provenance left intact. Explicit #include <core/version_gate.hpp> added to both headers.
This was referenced Jun 18, 2026
frstrtr
added a commit
that referenced
this pull request
Jun 18, 2026
dgb: delegate V36 version-gate sites to core::version_gate SSOT (#148)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces
core::version_gate— the single source of truth for the V36 share-format / consensus-revision activation boundary (uniform36across btc/ltc/bch/dgb; every coin's params set current_share_version=36).What
src/core/version_gate.hpp:V36_ACTIVATION_VERSION = 36+ constexpris_v36_active(version).share.hpp: 7 scatteredversion >= 36literals →core::version_gate::is_v36_active(version). Byte-identical gate, no value change.Scope
Conformance (BTC-first)
BTC is the reference adoption. ltc/dgb/bch conform later by mechanical site-rewrite (no value change). Remaining BTC
>= 36sites in share_check.hpp / share_tracker.hpp are follow-up mechanical rewires; this PR establishes the SSOT + canonical adoption in the share serializer.Verify
c2pool-btcbuilds green (self-verify, local cmake). constexpr predicate serves bothif constexprand runtime call sites.Merge operator-gated.